reply ID
AECreateAppleEvent Create Apple Event w/ attributes; no parameters
#include <AppleEvents.h> Apple Event Manager
OSErr AECreateAppleEvent( theAEEventClass, theAEEventID, target,
returnID, transactionID, result );
AEEventClass theAEEventClass ; event class of created event
AEEventID theAEEventID ; event ID of created event
AEAddressDesc * target ; address of the server application
short returnID ; return ID assigned to created event
long transactionID ; transaction ID for created event
AppleEvent * result ; the created Apple Event returned here
The AECreateAppleEvent function creates an Apple event with several
important attributes but no parameters.
The parameter theAEEventClass is the event class of the Apple event to be
created.
The parameter theAEEventID is the event ID of the Apple event to be created.
The target parameter is the address of the server application.
The returnID parameter is the return ID assigned to this Apple event; if the
kAutoGenerateReturnID constant is used as the value, the
Apple Event Manager assigns a return ID that is unique to the current
session.
The transactionID parameter is the transaction ID for this Apple event. A
transaction refers to a sequence of Apple events that are sent back and forth
between the client and server applications, beginning with the client's initial
request for a service. All Apple events that are part of a transaction must have
the same transaction ID. Use the constant kAnyTransactionID for this
parameter if it is not necessary to associate this Apple event with a specific
transaction.
The AECreateAppleEvent function returns in the result parameter the
resulting Apple event. Your application is responsible for using the
AEDisposeDesc function to dispose of the resulting Apple event once you are
finished using it.
If the function returns a nonzero result code, a descriptor record with the
typeNull descriptor type is returned. A descriptor record of this type does not
contain any data.
For a program example showing use of AECreateAppleEvent to send an
event, see the section entitled, Creating an Apple Event.
Result codes
noErr (0) No error
memFullErr (-108) Not enough room in heap zone